package com.aaa.controller;


import com.aaa.entity.Goods;
import com.aaa.service.impl.GoodsServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("goods")
public class GoodsController {

    @Resource
    GoodsServiceImpl goodsService;

    //查全部
    @RequestMapping("selectAll")
    @ResponseBody
    public List<Goods> selectAll(){
        return goodsService.selectAll();
    }

    @RequestMapping("Rimg")
    @ResponseBody
    public List<Goods> Rimg(Integer gid){
        return goodsService.Rimg(gid);
    }

}
